<template>
  <div>
    <DeviceCalibrationTaskView :id.sync="editId"></DeviceCalibrationTaskView>
  </div>
</template>
<script>
const DeviceManage = import("@/ModuleDeviceManage");
// import DeviceCalibrationTaskView from "../../ModuleDeviceManage/views/DeviceCalibration/DeviceCalibrationTask/DeviceCalibrationTaskView.vue";
// import {
//   verifyPass,
//   verifyReject,
// } from "../../ModuleDeviceManage/api/DeviceCalibrationTask";
export default {
  name: "AuditDeviceCalibrationTaskDialog",
  components: { DeviceCalibrationTaskView: DeviceManage.DeviceCalibrationTaskView },
  //  components: { DeviceCalibrationTaskView: DeviceCalibrationTaskView },
  props: {
    editId: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      loading: true,
    };
  },
  watch: {},
  created() { },
  methods: {
    innerPass(obj) {
      DeviceManage.Api["DeviceCalibrationTask"].verifyPass(obj)
        .then((res) => {
          this.$emit("passOrNoPassEmit");
        })
        .catch();

      // DeviceManage.Api["DeviceCalibrationTask"]
      //   .verifyPass(obj)
      //   .then((res) => {
      //     this.$emit("passOrNoPassEmit");
      //   })
      //   .catch();
    },
    innerReject(obj) {
      DeviceManage.Api["DeviceCalibrationTask"].verifyReject(obj)
        .then((res) => {
          this.$emit("passOrNoPassEmit");
        })
        .catch();

      // DeviceManage.Api["DeviceCalibrationTask"]
      //   .verifyReject(obj)
      //   .then((res) => {
      //     this.$emit("passOrNoPassEmit");
      //   })
      //   .catch();
    },
    innerWithdraw(obj) {
      obj.auditStatus = 60;

      // verifyReject(obj)
      //   .then((res) => {
      //     this.$emit("passOrNoPassEmit");
      //   })
      //   .catch();

      DeviceManage.Api["DeviceCalibrationTask"]
        .verifyReject(obj)
        .then((res) => {
          this.$emit("passOrNoPassEmit");
        })
        .catch();
    },
  },
};
</script>
<style scoped>
</style>
